package com.glory.erp.invoice.orderdetail.bean;

import com.glory.erp.invoice.goods.bean.Goods;
import com.glory.erp.invoice.order.bean.Order;
import com.glory.erp.util.FormatUtil;

/**
 * @Description: 订单明细
 * @Title: OrderDetail.java
 * @Author: 樊双峰
 * @Date: 2018年5月30日 下午10:52:08
 * @Version V1.0
 */
public class OrderDetail {

	/**
	 * id
	 */
	private Long uuid;
	
	/**
	 * 数量
	 */
	private Integer num;
	
	/**
	 * 剩余数量
	 */
	private Integer surplus;
	
	/**
	 * 价格
	 */
	private Double price;
	
	/**
	 * 价格 视图值
	 */
	private String priceView;
	
	/**
	 * 价格合计 视图值
	 */
	private String totalPriceView;
	
	/**
	 * 商品
	 */
	private Goods goods;
	
	/**
	 * 订单
	 */
	private Order order;

	public OrderDetail() {
	}

	public Long getUuid() {
		return uuid;
	}

	public void setUuid(Long uuid) {
		this.uuid = uuid;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
		this.priceView = FormatUtil.formatMoney(price);
		this.totalPriceView = FormatUtil.formatMoney(num*price);
	}

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public String getPriceView() {
		return priceView;
	}

	public String getTotalPriceView() {
		return totalPriceView;
	}

	public Integer getSurplus() {
		return surplus;
	}

	public void setSurplus(Integer surplus) {
		this.surplus = surplus;
	}
}